package com.xjy.headfirst.装饰者模式;

/**
 * @author :辛纪元
 * @date :2022-06-09 19:35
 * @description:
 */

public class StarbuzzCoffee {

    public static void main(String[] args) {
        Beverage beverage = new Espresso();
        System.out.println(beverage.cost());
        beverage.setSize(1);
        Beverage mocha = new Mocha(beverage);
        System.out.println(mocha.cost());
        beverage = new Mocha(mocha);
        System.out.println(beverage.cost());
    }

}
